Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production Release Nov Week 4 #6739

Merged
merged 36 commits into from
Nov 28, 2023
Merged

Production Release Nov Week 4 #6739

merged 36 commits into from
Nov 28, 2023

Conversation

gigincg
Copy link
Member

@gigincg gigincg commented Nov 28, 2023

WHAT

🤖[deprecated] Generated by Copilot at 466d4ed

This pull request introduces various improvements and fixes to the frontend code and UI of the care_fe application, as well as to the automated testing files and workflows. It adds new features such as infinite scrolling, route to facility selection, and date input validation. It also updates the UI elements, constants, and icons to match the latest changes and requirements. It enhances the code quality, readability, and security by removing unused code, formatting JSON data, adding error handling, and applying sandboxing. It modifies the Cypress test files and page objects to reflect the UI changes and to add new test cases. It adds a concurrency group to the deploy workflow to avoid conflicts or errors. It adds a new dependency for the react-infinite-scroll-component library.

Proposed Changes

  • Fixes #issue?
  • Change 1
  • Change 2
  • More?

@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers

Merge Checklist

  • Add specs that demonstrate bug / test a new feature.
  • Update product documentation.
  • Ensure that UI text is kept in I18n files.
  • Prep screenshot or demo video for changelog entry, and attach it to issue.
  • Request for Peer Reviews
  • Completion of QA

HOW

🤖[deprecated] Generated by Copilot at 466d4ed

  • Add a concurrency group to the deploy workflow to prevent multiple runs on the same branch or pull request (link)
  • Update the consultation status options and selectors in the patient CRUD test file and the patient consultation page object file to match the updated UI labels and element IDs (link, link, link, link, link)
  • Add a new test file and a new page object file for the facility creation feature, using the page object model and the cypress/e2e/facility_spec and cypress/pageobject/Facility folders (link, link)
  • Add a new dependency to the package.json file for the react-infinite-scroll-component library, which provides a component for infinite scrolling functionality (link)
  • Format and fix the JSON data for the icon paths in the UniconPaths.json file, to make it more compact, consistent, and valid (link, link, link)
  • Add a new prop named outOfLimitsErrorMessage to the DateInputV2 component and the ItemsProps interface in the PaginatedList.tsx file, which allows passing a custom error message for the date input component when the selected date is out of the allowed range (link, link)
  • Add conditional logic and error notification to the setDateValue function in the DateInputV2 component, which checks if the selected date is within the constraints before calling the onChange prop function and closing the date picker (link)
  • Replace the hardcoded placeholder texts with the translated texts using the t function in the DateInputV2 component, which supports internationalization and localization of the UI texts (link, link)
  • Refactor the rendering logic of the date cells in the DateInputV2 component, to make it more readable and maintainable, and to indicate the non-selectable dates with a not-allowed cursor style (link)
  • Remove the CONSULTATION_STATUS constant from the constants.tsx file, as it is no longer used in the application (link)
  • Add a new notification event named PATIENT_NOTE_ADDED to the NOTIFICATION_EVENTS constant in the constants.tsx file, which represents the event of adding a note to a patient's consultation (link)
  • Add a new constant named USER_TYPES_MAP to the constants.tsx file, which maps the user types from the backend to the user types displayed in the frontend (link)
  • Remove the import and the usage of the Cancel component from the ButtonV2 file and the ConfigureHealthFacility component, as it is not used or needed in that component (link, link)
  • Add a max prop to the date input component in the AssetServiceEditModal component, which sets the maximum allowed date to the created date of the service record (link)
  • Add two new query parameters to the AssetsList component, which are warranty_amc_end_of_validity_before and warranty_amc_end_of_validity_after, and are used to filter the assets by the end of validity date of their warranty or AMC contracts (link)
  • Add a h-full class to the link element in the AssetsList component, which sets the height of the link to the full height of its parent element (link)
  • Add an ID attribute with the value "export-button" to the div element that wraps the export menu component in the Export component, which helps to identify and locate the element in the UI tests (link)
  • Add a sandbox attribute to the iframe element in the FilePreviewDialog component, which enables an extra set of security restrictions for the embedded content (link)
  • Add a flex-wrap class to the div element that wraps the relative date and user mention components in the RelativeDateUserMention component, which allows the flex items to wrap onto multiple lines if they exceed the available space (link)
  • Add a new component file named RouteToFacilitySelect, which exports a custom select component for choosing the route to facility option for a patient's consultation, and renders a SelectFormField component with the options and labels (link)
  • Add an error prop and a disabled prop to the number input component and the submit button component in the AddBedForm component, which display an error message and disable the button if the number of beds is greater than 100 (link, link)
  • Remove two empty lines from the AddInventoryForm component file, which improve the code formatting and readability (link, link)
  • Replace the custom flex classes with a predefined class named cui-form-button-group in the AddInventoryForm component file, which applies the same flex styles and gap to the form buttons (link)
  • Add a disableFuture prop to the date input component in the AssetCreate component file, which disables the selection of future dates for the asset purchase date (link)

shyamprakash123 and others added 30 commits November 21, 2023 17:02
* add front end validation for number of beds

* disabled submit button when number of beds are greater than 100
…6623)

* move cancel button to the left side

* change className
* remove unnecessary onClick

* removed cursor pointer
* fix scroll overlay

* add style

* add hide button

* add loading logic
…ry in Consultation Dashboard. (#6576)

Co-authored-by: Mohammed Nihal <[email protected]>
Co-authored-by: Mohammed Nihal <[email protected]>
Co-authored-by: Rithvik Nishad <[email protected]>
* aligned buttons to right

* fixed merge conflict

* added pading
* Fixed date buttons out of range

* Added translations

* Fixed cursor

* Update DateInputV2.tsx

* Add max value

* disable future for last service date

---------

Co-authored-by: Ashesh <[email protected]>
* PaginatedList: fix `offset` not included in qParams

* fix error message

* convert dispatch to useQuery and request

* change components based on suggestions

* change api model to paginated api

* resolve merge conflict

* format code with prettier

* fix paginatedlist

* edit previous round

---------

Co-authored-by: rithviknishad <[email protected]>
* Implemented Insurance Details Page

* implemented insurace details card
…6579)

* Removed unnecessary cancel buttons and added a back button

* made the requested changes
* Add auto-scroll function to error in add triage form

* add scrollTo function to utils and refactor its usage at other points
…6458)

* `formatDateTime`: hide time if 12AM

* refactor patient_consultation

* Changes based on QA

* microsecond accuracy

* cypress fix

* fix cypress
* feat: add patient notes pop-up on consultation page

* Migrate form elements to CAREUI

* made patient notes popup responsive

* feat: updated ui of patient notes dedicated page

* resolved merge conflicts

* fix merge develop

* added doctor location

* used Page component in PatientNotes page

* Apply suggestions from code review

* added close button

* Apply suggestions from code review

* enchance doctor notes ux

* Merge branch 'develop' into doctor-notes-redesign

* replace usages of moment with dayjs

* Added user role in brackets

* added message listener for patient notes

* added border for notes by remote specialist

* added notification on patient note creation

* Update src/Components/Facility/PatientNoteCard.tsx

Co-authored-by: Rithvik Nishad <[email protected]>

* added types for notes object

* use existing types of patient notes model

* link system notification to notes page

* Fixes for real time webpush messages

* Fixes for notes popover

* Update service-worker.ts

* lint

---------

Co-authored-by: Rithvik Nishad <[email protected]>
Co-authored-by: Rithvik Nishad <[email protected]>
Co-authored-by: Ashesh3 <[email protected]>
* Filter out PUSH_MESSAGE notifications in
NotificationsList

* test

* revert test

* Fix styling issue in DailyRoundsList component

* Refactor DailyRoundsList component styles
@gigincg gigincg requested a review from a team as a code owner November 28, 2023 04:24
Copy link

netlify bot commented Nov 28, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 466d4ed
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/65656b6b4b4e5f0008f450cf
😎 Deploy Preview https://deploy-preview-6739--care-egov-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

vercel bot commented Nov 28, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview Nov 28, 2023 4:24am

@gigincg gigincg changed the title Production Release Nov Week 3 Production Release Nov Week 4 Nov 28, 2023
@gigincg gigincg merged commit 68d2edd into master Nov 28, 2023
92 of 107 checks passed
Copy link

@gigincg We truly appreciate your efforts. Thank you for taking the time to contribute; this is a very valuable contribution to us 🥇. We always welcome your contribution 🙂, so feel free to contribute to anything anytime, and never lose that spirit of innovation 🙌.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.